package com.changgou.dao;

import com.changgou.pojo.ItemInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

/**
 * @author: hushengjin
 */
public interface ItemInfoMapper extends Mapper<ItemInfo> {

    @Update("update item_info set count=count-#{count} where id=#{id} and count>= #{count}")
    int decrCount(@Param("id") int id, @Param("count") int count);

}
